<?php
class Control_Announce_changeTags {
	function changeTags() {
		$tagsId = MooForm::request('tagsId');
		$tagsName = MooForm::request('tagsName');
		$tagsDao = MooDao::get('Tags');
		$tagObj = $tagsDao->load($tagsId);
		
		if (!$tagObj) {
			$return['msg']  = "tagsId不存在";
			$return['code'] = 2;
			$this->backMsg($return);
		}

		$tagObj->set('t_tag', $tagsName);
		
		$return['msg']  = "保存成功";
		$return['code'] = 1;
		$this->backMsg($return);
	}
	private function backMsg($return) {
		exit(json_encode($return));
	}
}